package com.terrynoya.fight.io
{
	public class TextSection
	{
		private var _lines:Array;
		
		private var _title:String;
		
		private var _parsedLines:Array;
		
		public function TextSection(title:String,lines:Array,parsedLines:Array)
		{
			this._title = title;
			this._lines = lines;
			this._parsedLines = parsedLines;
		}
		
		public function getValue(key:String):String
		{
			var rlt:String;
			for (var i:int = 0; i < this._parsedLines.length; i++) 
			{
				var kv:KeyValuePair = this._parsedLines[i];
				if(kv.key == key)
				{
					rlt = kv.value;
				}
			}
			return rlt;
		}

		public function get parsedLines():Array
		{
			return _parsedLines;
		}

		public function set parsedLines(value:Array):void
		{
			_parsedLines = value;
		}

		public function get title():String
		{
			return _title;
		}

		public function set title(value:String):void
		{
			_title = value;
		}

		public function get lines():Array
		{
			return _lines;
		}

		public function set lines(value:Array):void
		{
			_lines = value;
		}

	}
}